﻿<UserControl x:Class="Dsl.Ped.AddIn.Java.Projections.ClassTextProjection.ClassTextProjection"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:ka="clr-namespace:Dsl.Ped.Framework.WPFControls.KeyAction;assembly=DslPedFramework"
             xmlns:kas="clr-namespace:Dsl.Ped.Framework.WPFControls.KeyActionSelector;assembly=DslPedFramework"
             xmlns:proj="clr-namespace:Dsl.Ped.Framework.Common;assembly=DslPedFramework"
             xmlns:pouc="clr-namespace:Dsl.Ped.Framework.WPFControls.ProjectiveObject;assembly=DslPedFramework"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             Background="Transparent">
    <UserControl.Resources>
        <ResourceDictionary Source="pack://application:,,,/DSLPedFramework;component/Resources/DefaultStyle.xaml" />
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        
        <StackPanel Orientation="Horizontal"
                    Grid.Row="0">
            <Label VerticalAlignment="Center"
                   Foreground="Blue">Class</Label>
            <AdornerDecorator>
                <TextBox BorderThickness="0"
                         Background="Transparent"
                         x:Name="nameTxtBox"
                         MinWidth="20"
                         VerticalAlignment="Center"
                         Validation.ErrorTemplate="{StaticResource ValidationErrorTemplate}"/>
            </AdornerDecorator>
            <Label VerticalAlignment="Center"
                   Foreground="Blue">extends</Label>
            <AdornerDecorator>
                <TextBox BorderThickness="0"
                     Background="Transparent"
                     MinWidth="20"
                     x:Name="superclassTxtBox"
                     VerticalAlignment="Center"
                     Validation.ErrorTemplate="{StaticResource ValidationErrorTemplate}"/>
            </AdornerDecorator>
            <Label VerticalAlignment="Center">{</Label>
            <kas:KeyActionSelectorUserControl VerticalAlignment="Center" 
                                              Key="Enter" 
                                              ItemsSource="{Binding Path=Options}"/>
        </StackPanel>

        <pouc:ProjectiveObjectUserControl Name="classContent" 
                                          Grid.Row="1"
                                          ProjectiveObject="{Binding Path=ProjectiveContent}"/>

        <StackPanel Grid.Row="2" 
                    Orientation="Horizontal" 
                    Background="Transparent">
            <ka:KeyActionUserControl VerticalAlignment="Center" Key="Back" Action="{Binding Path=BackKeyAction}"/>
            <Label VerticalAlignment="Center">}</Label>
        </StackPanel>
    </Grid>
</UserControl>